Drawdown caused by groundwater extraction

R.A. Collenteur & M. Bakker


In [1]:
import pandas as pd
import pastas as ps
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

In [ ]:


In [8]:
head = pd.read_csv("../data/head_wellex.csv", index_col="Date", parse_dates=True)
head = pd.read_csv("../data/head_wellex.csv", index_col="Date", parse_dates=True)
head = pd.read_csv("../data/head_wellex.csv", index_col="Date", parse_dates=True)
head = pd.read_csv("../data/head_wellex.csv", index_col="Date", parse_dates=True)


Out[8]:
DatetimeIndex(['1995-01-14', '1995-01-28', '1995-02-15', '1995-03-01',
               '1995-03-15', '1995-03-28', '1995-04-14', '1995-04-28',
               '1995-05-16', '1995-05-30',
               ...
               '2018-01-03', '2018-01-04', '2018-01-05', '2018-01-06',
               '2018-01-07', '2018-01-08', '2018-01-09', '2018-01-10',
               '2018-01-11', '2018-01-12'],
              dtype='datetime64[ns]', name='Date', length=3869, freq=None)

In [3]:
plt.figure(figsize=(14, 9))
ax1 = plt.axes([0.125, 0.68, 0.775, 0.2])
xticks = pd.date_range(start=pd.Timestamp('1995-01-01'), end=pd.Timestamp('2015-01-01'), freq='5AS-Jan')
mlw.oseries['1995':'2015'].plot(style='k.', label='observed', xticks=xticks, markersize=8)
plt.xlim(pd.Timestamp('1995-01-01'), pd.Timestamp('2015-01-01') )
plt.setp(ax1.get_xticklabels(), visible=False)
plt.xlabel('')
plt.ylabel('m')
ax2 = plt.axes([0.125, 0.54, 0.775, 0.1])
rainw['1995':'2015'].plot(color='C0')
#evapw['1995':'2015'].plot(color='C1')
plt.ylim(0, 0.05)
plt.xlim(pd.Timestamp('1995-01-01'), pd.Timestamp('2015-01-01') )
plt.setp(ax2.get_xticklabels(), visible=False)
plt.xlabel('')
plt.ylabel('m/d')
ax2b = plt.axes([0.125, 0.4, 0.775, 0.1])
#rainw['1995':'2015'].plot(color='C0')
evapw['1995':'2015'].plot(color='C2')
plt.ylim(0, 0.05)
plt.xlim(pd.Timestamp('1995-01-01'), pd.Timestamp('2015-01-01') )
plt.setp(ax2b.get_xticklabels(), visible=False)
plt.xlabel('')
plt.ylabel('m/d')
#plt.legend()
ax3 = plt.axes([0.125, 0.26, 0.775, 0.1])
wellq[:'2015'].plot(color='C1')
plt.xlim(pd.Timestamp('1995-01-01'), pd.Timestamp('2015-01-01') )
#plt.ylim(-2.1, -0.6)
plt.xlabel('Year')
plt.ylabel('Discharge')
#plt.legend(loc='upper left')
plt.savefig('figwellinput.eps', bbox_inches='tight')


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-e69fae12913a> in <module>
      2 ax1 = plt.axes([0.125, 0.68, 0.775, 0.2])
      3 xticks = pd.date_range(start=pd.Timestamp('1995-01-01'), end=pd.Timestamp('2015-01-01'), freq='5AS-Jan')
----> 4 mlw.oseries['1995':'2015'].plot(style='k.', label='observed', xticks=xticks, markersize=8)
      5 plt.xlim(pd.Timestamp('1995-01-01'), pd.Timestamp('2015-01-01') )
      6 plt.setp(ax1.get_xticklabels(), visible=False)

NameError: name 'mlw' is not defined

In [4]:
head


Out[4]:
1995-01-14 15.74
0 1995-01-28 15.920000
1 1995-02-15 16.170000
2 1995-03-01 16.260000
3 1995-03-15 16.120000
4 1995-03-28 16.080000
5 1995-04-14 15.960000
6 1995-04-28 15.590000
7 1995-05-16 15.800000
8 1995-05-30 15.790000
9 1995-06-15 15.770000
10 1995-06-29 15.690000
11 1995-07-15 15.400000
12 1995-07-28 14.860000
13 1995-08-15 15.140000
14 1995-08-29 15.040000
15 1995-09-15 15.020000
16 1995-09-29 14.980000
17 1995-10-14 14.990000
18 1995-10-28 14.950000
19 1995-11-15 14.910000
20 1995-11-29 14.870000
21 1995-12-15 14.830000
22 1995-12-29 14.860000
23 1996-01-16 14.880000
24 1996-01-30 14.910000
25 1996-02-15 14.900000
26 1996-02-29 14.960000
27 1996-03-15 14.990000
28 1996-03-30 14.990000
29 1996-04-17 15.020000
... ... ...
3838 2017-12-14 16.230000
3839 2017-12-15 16.306250
3840 2017-12-16 16.317083
3841 2017-12-17 16.301250
3842 2017-12-18 16.296667
3843 2017-12-19 16.315000
3844 2017-12-20 16.307500
3845 2017-12-21 16.303333
3846 2017-12-22 16.299167
3847 2017-12-23 16.294583
3848 2017-12-24 16.298333
3849 2017-12-25 16.300833
3850 2017-12-26 16.310000
3851 2017-12-27 16.313333
3852 2017-12-28 16.317917
3853 2017-12-29 16.272917
3854 2017-12-30 16.284167
3855 2017-12-31 16.303750
3856 2018-01-01 16.354167
3857 2018-01-02 16.400417
3858 2018-01-03 16.437917
3859 2018-01-04 16.517917
3860 2018-01-05 16.556250
3861 2018-01-06 16.550000
3862 2018-01-07 16.503333
3863 2018-01-08 16.442917
3864 2018-01-09 16.434583
3865 2018-01-10 16.436667
3866 2018-01-11 16.416250
3867 2018-01-12 16.390714

3868 rows × 2 columns


In [ ]: